# PN532Tool

Tool which initializes and reads cards from `PN532` nfc reader using `HSU`,
which is connected into computer using either serial interface or usb->ttl
converter.

## How does it work

Initialization takes only 3 steps.

```
send: ff ff ff ff ff ff ff ff ff 00 ff 03 fd d4 58 00 d4 d4
[ack]: 00 00 ff 00 ff 00
send: ff ff ff ff ff ff ff ff ff 00 ff 02 fe d4 02 2a d4
recv: 00 00 ff 00 ff 00 00 00 ff 06 fa d5 03 32 01 06 07 e8 00
send: ff ff ff ff ff ff ff ff ff 00 ff 02 fe d4 04 28 d4
recv: 00 00 ff 00 ff 00 00 00 ff 06 fa d5 05 00 00 00 80 a6 00
```
 No matter what `00 00 80` means, it simple indicates everything is ok


Card detected:

```
Read (10) bytes:01 01 00 04 08 04 e9 1f 04 ba
```

`04` stands for length of the card address, it depends on the card type,
it could consist of a quite big amount of bytes, check documentation for
the card you're using.

`e9 f1...` is the id.


## Usage

```
Usage: ./pn532tool [options]

 -p[port]   tty port (default: /dev/ttyUSB0)
 -x         print hex (debug)

pn532tool v0.0.1 by @hakanai
```

## License

 GPLv2
